package com.om.common;

import java.io.InputStream;
import java.util.Properties;




public class ConfigReader extends Properties {
	public static  String ResourcePath="";
	private static ConfigReader reader = null;
	
	
	public ConfigReader() {
		InputStream is = null;
		try {
			is = super.getClass().getResourceAsStream(ResourcePath);
			load(is);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
	
	private static ConfigReader GetInstance(){
		if(ConfigReader.reader==null){
			ConfigReader.reader = new ConfigReader();
		}
		return ConfigReader.reader;
	}
	
	public static String GetProptery(String key) {
		String value = "";
		try {
			if (ConfigReader.GetInstance().getProperty(key) != null) {
				value = reader.getProperty(key);
			}

		} catch (Exception ex) {
			//ex.printStackTrace();
		}
		return value;
	}
}

